/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sunat;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Julio
 */
@Entity
@Table(name = "tbl_proveedores")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblProveedores.findAll", query = "SELECT t FROM TblProveedores t"),
    @NamedQuery(name = "TblProveedores.findByIdproveedor", query = "SELECT t FROM TblProveedores t WHERE t.idproveedor = :idproveedor"),
    @NamedQuery(name = "TblProveedores.findByRazonsocial", query = "SELECT t FROM TblProveedores t WHERE t.razonsocial = :razonsocial"),
    @NamedQuery(name = "TblProveedores.findByHabilitado", query = "SELECT t FROM TblProveedores t WHERE t.habilitado = :habilitado")})
public class TblProveedores implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 4)
    @Column(name = "idproveedor")
    private String idproveedor;
    @Size(max = 45)
    @Column(name = "razonsocial")
    private String razonsocial;
    @Size(max = 1)
    @Column(name = "habilitado")
    private String habilitado;

    public TblProveedores() {
    }

    public TblProveedores(String idproveedor) {
        this.idproveedor = idproveedor;
    }

    public String getIdproveedor() {
        return idproveedor;
    }

    public void setIdproveedor(String idproveedor) {
        this.idproveedor = idproveedor;
    }

    public String getRazonsocial() {
        return razonsocial;
    }

    public void setRazonsocial(String razonsocial) {
        this.razonsocial = razonsocial;
    }

    public String getHabilitado() {
        return habilitado;
    }

    public void setHabilitado(String habilitado) {
        this.habilitado = habilitado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idproveedor != null ? idproveedor.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblProveedores)) {
            return false;
        }
        TblProveedores other = (TblProveedores) object;
        if ((this.idproveedor == null && other.idproveedor != null) || (this.idproveedor != null && !this.idproveedor.equals(other.idproveedor))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sunat.TblProveedores[ idproveedor=" + idproveedor + " ]";
    }
    
}
